package com.own.business.question.business.service;

import com.own.business.question.entity.bo.PracticeBo;
import com.own.business.question.entity.map.PracticeMapVo;
import com.own.business.question.entity.model.PracticeConfig;
import com.own.business.question.entity.po.Practice;
import com.own.business.question.entity.query.PracticeQuery;
import com.own.business.question.entity.vo.PracticeVo;
import com.own.component.common.base.service.BaseService;

/**
 * PracticeService
 *
 * @author 陈学礼 （你是一段成熟的代码，要学会自己改bug）
 * @version 4.0.0
 * @date 2021/05/14 15:49:28
 * @since 4.0.0
 */
public interface PracticeService extends BaseService<
        Practice,
        PracticeBo,
        PracticeVo,
        PracticeMapVo,
        PracticeQuery
        > {

    /**
     * 获取练习题目
     *
     * @param targetId 目标id
     * @param userId   获取题目的用户id
     * @param config   练习配置
     * @return 练习信息
     */
    PracticeVo getPractice(Long targetId, Long userId, PracticeConfig config);

    /**
     * 获取新的练习信息
     *
     * @param targetId 目标id
     * @param userId   获取题目的用户id
     * @param config   练习配置
     * @return 练习信息
     */
    PracticeVo getNewPractice(Long targetId, Long userId, PracticeConfig config);

    /**
     * 确认练习信息（获取成绩）
     *
     * @param pk 练习id
     * @return 练习信息
     */
    PracticeVo checkPractice(Long pk);

}
